package xhwl.insurance.http.api;

import com.google.gson.Gson;

import okhttp3.RequestBody;
import rx.Observable;
import xhwl.insurance.http.ApiService;
import xhwl.retrofitrx.BaseApi;

/**
 * Created by admin on 2017-07-26.
 */

public class OrderDescApi extends BaseApi {
    OrderDescReq req;
    public OrderDescApi(String member_id, String order_id, String sj_type){
        req=new OrderDescReq(member_id,order_id,sj_type);
    }
    @Override
    protected Observable getObservable() {
        RequestBody requestBody = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), new Gson().toJson(req));
        return retrofit.create(ApiService.class).orderDescInfo(requestBody);
    }
    private class OrderDescReq{
        private String member_id;
        private String order_id;
        private String sj_type;

        public OrderDescReq(String member_id, String order_id, String sj_type) {
            super();
            this.member_id = member_id;
            this.order_id = order_id;
            this.sj_type = sj_type;
        }

    }
}
